home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / changelog.vim < prev    next >
Encoding:
Text File  |  2001-09-04  |  2.4 KB  |  66 lines

  1. " Vim syntax file
  2. " Language:    generic ChangeLog file
  3. " Written By:    Gediminas Paulauskas <menesis@delfi.lt>
  4. " Maintainer:    Corinna Vinschen <vinschen@redhat.com>
  5. " Last Change:    Sep 3, 2001
  6.  
  7. " For version 5.x: Clear all syntax items
  8. " For version 6.x: Quit when a syntax file was already loaded
  9. if version < 600
  10.   syntax clear
  11. elseif exists("b:current_syntax")
  12.   finish
  13. endif
  14.  
  15. syn case ignore
  16.  
  17. syn match    changelogText    "^\s.*$" contains=changelogMail,changelogNumber,changelogMonth,changelogDay
  18. syn match    changelogHeader    "^\S.*$" contains=changelogNumber,changelogMonth,changelogDay,changelogMail
  19. if version < 600
  20.   syn region    changelogFiles    start="^\s\+[+*]\s" end=":\s" end="^$" contains=changelogBullet,changelogColon keepend
  21.   syn region    changelogFiles    start="^\s\+[([]" end=":\s" end="^$" contains=changelogBullet,changelogColon keepend
  22.   syn match    changelogColon    contained ":\s"
  23. else
  24.   syn region    changelogFiles    start="^\s\+[+*]\s" end=":" end="^$" contains=changelogBullet,changelogColon,changeLogFuncs keepend
  25.   syn region    changelogFiles    start="^\s\+[([]" end=":" end="^$" contains=changelogBullet,changelogColon,changeLogFuncs keepend
  26.   syn match    changeLogFuncs  contained "(.\{-})" extend
  27.   syn match    changeLogFuncs  contained "\[.\{-}]" extend
  28.   syn match    changelogColon    contained ":"
  29. endif
  30. syn match    changelogBullet    contained "^\s\+[+*]\s"
  31. syn match    changelogMail    contained "<[A-Za-z0-9\._:+-]\+@[A-Za-z0-9\._-]\+>"
  32. syn keyword    changelogMonth    contained jan feb mar apr may jun jul aug sep oct nov dec
  33. syn keyword    changelogDay    contained mon tue wed thu fri sat sun
  34. syn match    changelogNumber    contained "[.-]*[0-9]\+"
  35.  
  36. " Define the default highlighting.
  37. " For version 5.7 and earlier: only when not done already
  38. " For version 5.8 and later: only when an item doesn't have highlighting yet
  39. if version >= 508 || !exists("did_changelog_syntax_inits")
  40.   if version < 508
  41.     let did_changelog_syntax_inits = 1
  42.     command -nargs=+ HiLink hi link <args>
  43.   else
  44.     command -nargs=+ HiLink hi def link <args>
  45.   endif
  46.  
  47.   HiLink changelogText        Normal
  48.   HiLink changelogBullet    Type
  49.   HiLink changelogColon        Type
  50.   HiLink changelogFiles        Comment
  51.   if version >= 600
  52.     HiLink changelogFuncs        Comment
  53.   endif
  54.   HiLink changelogHeader    Statement
  55.   HiLink changelogMail        Special
  56.   HiLink changelogNumber    Number
  57.   HiLink changelogMonth        Number
  58.   HiLink changelogDay        Number
  59.  
  60.   delcommand HiLink
  61. endif
  62.  
  63. let b:current_syntax = "changelog"
  64.  
  65. " vim: ts=8
  66.